package org.kl.bpm.entity.conf;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.kl.bf.entity.AuditableEntity;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * 
 * @Author hqm
 * @CreateTime 2014年5月25日 下午8:05:24
 * 流程KV变量记录明细表
 */
@Entity
@Table(name = "bpm_kv_prop")
public class BpmKvProp extends AuditableEntity {
	private static final long serialVersionUID = -4515768271000193094L;
	/**
	 * 表单属性的中文名称，form表单的label
	 */
	private String fieldLabel;
	/**
	 * 属性KEY
	 */
	private String code;
	/**
	 * 默认为0(流程缓存数据)，1（任务表单数据）
	 */
	private int type;
	private String value;
	private String taskId;
	private String taskDefinitionKey;
	private BpmKvRecord bpmKvRecord;

	@Column(name = "prop_code", length = 200)
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	@Column(name = "prop_value", length = 200)
	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@JsonIgnore
	@ManyToOne
	@JoinColumn(name = "record_id")
	public BpmKvRecord getBpmKvRecord() {
		return bpmKvRecord;
	}

	public void setBpmKvRecord(BpmKvRecord bpmKvRecord) {
		this.bpmKvRecord = bpmKvRecord;
	}

	public String getFieldLabel() {
		return fieldLabel;
	}

	public void setFieldLabel(String fieldLabel) {
		this.fieldLabel = fieldLabel;
	}

	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	public String getTaskDefinitionKey() {
		return taskDefinitionKey;
	}

	public void setTaskDefinitionKey(String taskDefinitionKey) {
		this.taskDefinitionKey = taskDefinitionKey;
	}
}
